package think.thread.sychron.c01;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class WaxOnCar {
	
	public static void main(String[] args) throws Exception{
		Car car=new Car();
		ExecutorService exec=Executors.newCachedThreadPool();
		
		exec.execute(new WaxOff(car));
		exec.execute(new WaxOn(car));
		
		TimeUnit.SECONDS.sleep(3);
		
		exec.shutdownNow();
	}
	
}
